{php include pubTemplate("header")}


<div class="container">


    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{SITE_URL}">首页</a></li>
            <li class="breadcrumb-item"><a href="{tsUrl('weibo')}">{$TS_APP['appname']}</a></li>
            <li class="breadcrumb-item active" aria-current="page">{php echo cututf8($title,0,20)}</li>
        </ol>
    </nav>


<div class="row">

<div class="col-md-8">


    <div class="card">
        <div class="card-body">

            <div class="weibo_show">
   <ul>
<li class="mbtl">
<a href="{tsUrl('user','space',array('id'=>$strWeibo['user']['userid']))}"><img class="rounded-circle" title="{$strWeibo['user']['username']}" alt="{$strWeibo['user']['username']}" src="{$strWeibo['user']['face']}" width="36" /></a>
</li>
<li class="mbtr rounded">
    <div class="author"><a href="{tsUrl('user','space',array('id'=>$strWeibo['user']['userid']))}">{$strWeibo['user']['username']}</a> <span class="fs12 c9">{$strWeibo['addtime']}</span></div>
<div class="fs16 pt-2 pb-2">
{$strWeibo['title']}
</div>

{if $arrPhoto}
<div>
    {loop $arrPhoto $key $item}
    <p class="mb-2">
        <a target="_blank" href="{$item['photo_url']}">
            <img class="mw-100" src="{php echo tsXimg($item['photo'],'weibo/photo',640,'',$item['path'])}" />
        </a>
    </p>
    {/loop}
</div>
{/if}

<div class="text-right fs12">
{if $GLOBALS['TS_USER']['isadmin'] == 1}
<a onclick="return confirm('确定删除?')" href="{tsUrl('weibo','delete',array('weiboid'=>$strWeibo['weiboid']))}"><i class="bi bi-trash"></i> 删除</a>
{/if}
</div>
</li>
   </ul>
            </div>


        </div>
</div>




<div class="card">
    <div class="card-header">评论{if $strWeibo['count_comment']} <small class="text-secondary">({$strWeibo['count_comment']})</small>{/if}</div>
    <div class="card-body">

        <!--评论列表-->
        {php include pubTemplate("comment")}

        <div class="commentform">
            
            {if tsIntval($GLOBALS['TS_USER']['userid'])==0}
                <div class="tac pd20 fw300">
                    <a href="{tsUrl('user','login')}">登录</a> | <a href="{tsUrl('user','register')}">注册</a>
                </div>
                {else}

                <form id="comm-form" method="post" action="{SITE_URL}index.php?app=comment&ac=add">
                    <div >
                        <textarea id="tseditor" name="content"></textarea>
                    </div>
                    <div class="row mt-3">
                        <div class="col-md-6">
                            {if $GLOBALS['TS_SITE']['isauthcode']}
                            <input class="form-control form-control-sm w-auto float-left" name="authcode" placeholder="输入验证码" />
                            <img class="mt-1 ml-1" src="{tsUrl('pubs','code')}" onclick="javascript:newgdcode(this,this.src);" title="点击刷新验证码" alt="点击刷新验证码" style="cursor:pointer;"/>
                            {/if}
                        </div>
                        <div class="col-md-4">
                            <div class="mt-1">是否公开：<input type="radio" name="ispublic" value="0" checked />公开 <input type="radio" name="ispublic" value="1" />不公开</div>
                        </div>
                        <div class="col-md-2 text-right">
                            <input type="hidden" name="ptable" value="weibo">
                            <input type="hidden" name="pkey" value="weiboid">
                            <input type="hidden" name="pid" value="{$strWeibo['weiboid']}" />
                            <input type="hidden" name="token" value="{$_SESSION['token']}" />
                            <button class="btn btn-sm btn-info btn-block" type="submit">提交评论</button>
                        </div>
                    </div>
                </form>
                {/if}

        </div>

    </div>
</div>






    <div class="card">
        <div class="card-header">更多{$strWeibo['user']['username']}的唠叨</div>
        <div class="card-body">


            <div class="commlist">
                <ul>
                    {loop $arrWeibo $key $item}
                    <li><a href="{tsUrl('weibo','show',array('id'=>$item['weiboid']))}">{$item['title']}</a></li>
                    {/loop}
                </ul>
            </div>

</div>
</div>


</div>


<div class="col-md-4">

    <div class="card">
        <div class="card-header">热门唠叨</div>
        <div class="card-body">

            <div class="weilist">
                <ul>
                    {loop $arrHotWeibo $key $item}
                    <li>
                        <div class="portrait">
                            <a href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}"><img class="rounded-circle" title="{$item['user']['username']}" alt="{$item['user']['username']}" src="{$item['user']['face']}"></a>
                        </div>
                        <div class="body">
                            <div>
                                <span class="user"><a href="{tsUrl('user','space',array('id'=>$item['user']['userid']))}">{$item['user']['username']}</a>：</span><span class="log">{$item['title']}</span>
                            </div>

                            {if $item['photo']}
                            <div class="d-flex">
                                {loop $item['photo'] $pkey $pitem}
                                <a class="w-25 p-1" href="{tsUrl('weibo','show',array('id'=>$item['weiboid']))}"><img class="w-100" src="{$pitem}">
                                {/loop}
                            </div>
                            {/if}

                            <div class="time">{php echo getTime(strtotime($item['addtime']),time())} (<a href="{tsUrl('weibo','show',array('id'=>$item['weiboid']))}">{$item['count_comment']}评</a>)
                            </div>
                        </div>
                        <div class="clear"></div>
                    </li>
                    {/loop}
                </ul>
            </div>

        </div>
    </div>


<!--广告位-->
{php doAction('gobad','300')}


</div>

</div>

</div>

{php doAction('tseditor','mini')}
{php include pubTemplate("footer")}